package com.mmy.service.oa.impl;

import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mmy.mapper.AccountDao;

@Service
public class AccountService {
	
	@Autowired
	private AccountDao accountDao;
	
	/**
	 *   会计审核列表
	 *
	 * @author 创建人 liys
	 * @date 创建日期 2021.04.07
	 */
	public List<Map<String,Object>> findAccountList(int iOrgID,String table,int state,String type,int index,int count,String accountState){
		
		Integer iType = 0;
		if(type == "" || type== null) {
			iType = 0;
		}else {
			iType = Integer.parseInt(type);
		}
		
		return accountDao.getList(iOrgID,table,state,iType,index,count,accountState);
	}
	/**
	 *   近郊游会计审核列表
	 *
	 * @author 创建人 liys
	 * @date 创建日期 2021.04.07
	 */
	public List<Map<String,Object>> findAccountSurround(int iOrgID,int state,int index,int count,String accountState){
		
		return accountDao.surroundList(iOrgID,state,index,count,accountState);
	}
	/**
	 *   通过审核
	 *
	 * @author 创建人 liys
	 * @date 创建日期 2021.04.08
	 */
	public int accountPass(String table,int iID,int iOrgID) {
		return accountDao.accountPass(table, iID, iOrgID);
	}
	
	/**
	 *   驳回审核
	 *
	 * @author 创建人 liys
	 * @date 创建日期 2021.04.08
	 */
	public int accountFail(String table,int iID,int iOrgID) {
		return accountDao.accountFail(table, iID, iOrgID);
	}
	
	/**
	 *   近郊游审核
	 *
	 * @author 创建人 liys
	 * @date 创建日期 2021.04.08
	 */
	public int accountSurroundCheck(int iID,int iOrgID,int accountState) {
		return accountDao.accountSurround(iID, iOrgID, accountState);
	}
}
